﻿/*
    This file is part of News Worm.

    News Worm is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    News Worm is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with News Worm.  If not, see <http://www.gnu.org/licenses/>.
 */

using System;
using System.Diagnostics;
using System.Drawing;
using System.Windows.Forms;

namespace NewsWorm {
    internal partial class AboutDialog : Form {
        internal AboutDialog( ) {
            InitializeComponent();
            this.Font = SystemFonts.MessageBoxFont;
            LabelVersion.Text = "v" + Application.ProductVersion;
        }

        private void AboutDialog_KeyDown( object sender, KeyEventArgs e ) {
            if ( e.KeyCode == Keys.Escape )
                this.Close();
        }

        private void linkLabelHome_LinkClicked( object sender, LinkLabelLinkClickedEventArgs e ) {
            try {
                Process.Start( "http://www.newsworm.net" );
            } catch ( Exception ex ) {
                new MyMessageBoxError( ex.Message, ex.StackTrace ).ShowDialog();
            }
        }

    }
}
